import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopShareController } from '../../../controllers';
const uctoominishopShareRouter = new Router();
const minishopShareController = new uctooMinishopShareController();

uctoominishopShareRouter.post('/add', requireUser, minishopShareController.add);
uctoominishopShareRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_share'), minishopShareController.edit);
uctoominishopShareRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_share'), minishopShareController.delete);

//For getting minishopShare with permission control
uctoominishopShareRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_share'), minishopShareController.getSingle);
uctoominishopShareRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_share'), minishopShareController.getMany);
uctoominishopShareRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_share'), minishopShareController.getMany);

//#endregion AutoCreateCode
export default uctoominishopShareRouter;
